<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): include/nearest_centroids.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">nearest_centroids.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="nearest__centroids_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef  __NEAREST_CENTROIDS_HPP</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define  __NEAREST_CENTROIDS_HPP</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacenearest.html">nearest</a> {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">template</span> &lt; <span class="keyword">class </span>T_CLUSTERIDX,</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;           <span class="keyword">class </span>T_DIST</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;           &gt;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html">   32</a></span>&#160;<span class="keyword">class </span><a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids</a></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">   35</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">NearestCentroids</a>() : </div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>(-1), </div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>(0), </div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>(true) </div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  { }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">NearestCentroids</a></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#adf58fbd97457fd70ce54079e4078c3aa">   41</a></span>&#160;  (<span class="keyword">const</span> T_CLUSTERIDX  aimidx_nearestClusterK,</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;   T_DIST              airt_distCentroidCentroid,</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;   <span class="keywordtype">bool</span>                aib_distRecalculate</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;   ):</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>(aimidx_nearestClusterK),</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>(airt_distCentroidCentroid),</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>(aib_distRecalculate)</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  { }</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="comment">//copy constructor</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">NearestCentroids</a></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#af52008fccba07d92da7f53747562dd10">   52</a></span>&#160;  (<span class="keyword">const</span> <a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a> &amp;ainearcent_b):</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>), </div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>), </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>)</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  { }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="comment">//move constructor</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">NearestCentroids</a></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#ad696ba7c96fd5d94a094df293bf561c1">   60</a></span>&#160;  (<a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a> &amp;&amp;ainearcent_b):</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>), </div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>), </div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>(ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>)</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a> = -1;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> = 0;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a7730ee14b5b57c1d29ffb59033a4591d">   70</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a7730ee14b5b57c1d29ffb59033a4591d">~NearestCentroids</a>() { }</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a>&amp;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#ac7061ecafca05784cdeee83cd704ab34">   73</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#ac7061ecafca05784cdeee83cd704ab34">operator=</a>(<span class="keyword">const</span> <a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a> &amp;ainearcent_b)</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  {</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">if</span>( <span class="keyword">this</span> != &amp;ainearcent_b ) { </div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>; </div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>; </div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    </div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a>&amp;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a4e6ad28f20cc1f7fc338aa101bbc6b18">   85</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a4e6ad28f20cc1f7fc338aa101bbc6b18">operator=</a>(<a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_CLUSTERIDX,T_DIST&gt;</a> &amp;&amp;ainearcent_b)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">if</span>( <span class="keyword">this</span> != &amp;ainearcent_b ) { </div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>; </div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>; </div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;      <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> = ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a> = -1;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> = 0;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  </div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keywordtype">void</span> </div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#afa348cce0d86d36befefbbbdef06e985">  102</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#afa348cce0d86d36befefbbbdef06e985">setDistCentroidCentroid</a>(<span class="keyword">const</span> T_DIST airt_distCentroidCentroid)</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  {</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> = airt_distCentroidCentroid;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  }</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="keywordtype">void</span> </div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a0ae655a2ae18850690297948dc48983c">  109</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a0ae655a2ae18850690297948dc48983c">setNearestClusterK</a>(<span class="keyword">const</span> T_CLUSTERIDX aimidx_midx_nearestClusterK)</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a> = aimidx_midx_nearestClusterK;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keywordtype">void</span> </div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a98a4333e0b8654230d82e3d04156f5db">  116</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a98a4333e0b8654230d82e3d04156f5db">setDistRecalculate</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> aib_distRecalculate)</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  {</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> = aib_distRecalculate;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  }</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  T_DIST</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#ad1f0275e10c231a5f2a6e62e400048a8">  123</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#ad1f0275e10c231a5f2a6e62e400048a8">getDistCentroidCentroid</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keyword">  </span>{</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">return</span> this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  }</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  T_CLUSTERIDX</div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a84c46e680f0465aa96dd8ddc524ef215">  130</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a84c46e680f0465aa96dd8ddc524ef215">getNearestClusterK</a>()<span class="keyword"> const </span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="keyword">  </span>{</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">return</span> this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keyword">inline</span> </div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a7166aa1c05aa9640d11d51677d53890e">  137</a></span>&#160;  <a class="code" href="classnearest_1_1_nearest_centroids.html#a7166aa1c05aa9640d11d51677d53890e">getDistRecalculate</a>()</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  {</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">return</span> this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  }</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a76472d35ffd9f82d287c06efd77fa06b">  142</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classnearest_1_1_nearest_centroids.html#a76472d35ffd9f82d287c06efd77fa06b">menor</a>(<span class="keyword">const</span> <a class="code" href="classnearest_1_1_nearest_centroids.html">NearestCentroids&lt;T_DIST, T_CLUSTERIDX&gt;</a> &amp;ainearcent_b) </div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  {</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span>  ainearcent_b.<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a> &lt; this-&gt;<a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  }</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  </div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#a141ceaeb19ebcdaee5c559b18c009990">  147</a></span>&#160;  <span class="keywordtype">void</span>  <a class="code" href="classnearest_1_1_nearest_centroids.html#a141ceaeb19ebcdaee5c559b18c009990">print</a>(std::ostream &amp;os=std::cout, <span class="keywordtype">char</span> delim=<span class="charliteral">&#39;,&#39;</span>)</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  {</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    os &lt;&lt; <span class="charliteral">&#39;(&#39;</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;       &lt;&lt; <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;       &lt;&lt; delim</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;       &lt;&lt; <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a></div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;       &lt;&lt; delim &lt;&lt; <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a> &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  }</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">  157</a></span>&#160;  T_CLUSTERIDX    <a class="code" href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">_cidx_nearestClusterK</a>;</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">  158</a></span>&#160;  T_DIST          <a class="code" href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">_rt_distCentroidCentroid</a>;</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">  159</a></span>&#160;  <span class="keywordtype">bool</span>            <a class="code" href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">_b_distRecalculate</a>; </div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;}; <span class="comment">/*NearestCentroids*/</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;} <span class="comment">/*END namespace nearest*/</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="preprocessor">#endif  </span><span class="comment">/*__NEAREST_CENTROIDS_HPP*/</span><span class="preprocessor"></span></div><div class="ttc" id="classnearest_1_1_nearest_centroids_html_a4e6ad28f20cc1f7fc338aa101bbc6b18"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a4e6ad28f20cc1f7fc338aa101bbc6b18">nearest::NearestCentroids::operator=</a></div><div class="ttdeci">NearestCentroids&lt; T_CLUSTERIDX, T_DIST &gt; &amp; operator=(NearestCentroids&lt; T_CLUSTERIDX, T_DIST &gt; &amp;&amp;ainearcent_b)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00085">nearest_centroids.hpp:85</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_ac1dbf3bd365b30434017ce9697e61d7c"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#ac1dbf3bd365b30434017ce9697e61d7c">nearest::NearestCentroids::_b_distRecalculate</a></div><div class="ttdeci">bool _b_distRecalculate</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00159">nearest_centroids.hpp:159</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a92f1697e5923ce47dbaca2cb7da64635"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a92f1697e5923ce47dbaca2cb7da64635">nearest::NearestCentroids::NearestCentroids</a></div><div class="ttdeci">NearestCentroids()</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00035">nearest_centroids.hpp:35</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_ac7061ecafca05784cdeee83cd704ab34"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#ac7061ecafca05784cdeee83cd704ab34">nearest::NearestCentroids::operator=</a></div><div class="ttdeci">NearestCentroids&lt; T_CLUSTERIDX, T_DIST &gt; &amp; operator=(const NearestCentroids&lt; T_CLUSTERIDX, T_DIST &gt; &amp;ainearcent_b)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00073">nearest_centroids.hpp:73</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_abd5f8c3c812f7f4d3ca21066496f0f1b"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#abd5f8c3c812f7f4d3ca21066496f0f1b">nearest::NearestCentroids::_cidx_nearestClusterK</a></div><div class="ttdeci">T_CLUSTERIDX _cidx_nearestClusterK</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00157">nearest_centroids.hpp:157</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a0ae655a2ae18850690297948dc48983c"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a0ae655a2ae18850690297948dc48983c">nearest::NearestCentroids::setNearestClusterK</a></div><div class="ttdeci">void setNearestClusterK(const T_CLUSTERIDX aimidx_midx_nearestClusterK)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00109">nearest_centroids.hpp:109</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_ad1f0275e10c231a5f2a6e62e400048a8"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#ad1f0275e10c231a5f2a6e62e400048a8">nearest::NearestCentroids::getDistCentroidCentroid</a></div><div class="ttdeci">T_DIST getDistCentroidCentroid() const</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00123">nearest_centroids.hpp:123</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_ae1293f4149e02ec80d523791d310a676"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#ae1293f4149e02ec80d523791d310a676">nearest::NearestCentroids::_rt_distCentroidCentroid</a></div><div class="ttdeci">T_DIST _rt_distCentroidCentroid</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00158">nearest_centroids.hpp:158</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a98a4333e0b8654230d82e3d04156f5db"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a98a4333e0b8654230d82e3d04156f5db">nearest::NearestCentroids::setDistRecalculate</a></div><div class="ttdeci">void setDistRecalculate(const bool aib_distRecalculate)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00116">nearest_centroids.hpp:116</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_afa348cce0d86d36befefbbbdef06e985"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#afa348cce0d86d36befefbbbdef06e985">nearest::NearestCentroids::setDistCentroidCentroid</a></div><div class="ttdeci">void setDistCentroidCentroid(const T_DIST airt_distCentroidCentroid)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00102">nearest_centroids.hpp:102</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a7730ee14b5b57c1d29ffb59033a4591d"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a7730ee14b5b57c1d29ffb59033a4591d">nearest::NearestCentroids::~NearestCentroids</a></div><div class="ttdeci">~NearestCentroids()</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00070">nearest_centroids.hpp:70</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a141ceaeb19ebcdaee5c559b18c009990"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a141ceaeb19ebcdaee5c559b18c009990">nearest::NearestCentroids::print</a></div><div class="ttdeci">void print(std::ostream &amp;os=std::cout, char delim=',')</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00147">nearest_centroids.hpp:147</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a84c46e680f0465aa96dd8ddc524ef215"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a84c46e680f0465aa96dd8ddc524ef215">nearest::NearestCentroids::getNearestClusterK</a></div><div class="ttdeci">T_CLUSTERIDX getNearestClusterK() const</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00130">nearest_centroids.hpp:130</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html">nearest::NearestCentroids</a></div><div class="ttdoc">Stores the relationship between centroids, the closest and its distance.</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00032">nearest_centroids.hpp:32</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a76472d35ffd9f82d287c06efd77fa06b"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a76472d35ffd9f82d287c06efd77fa06b">nearest::NearestCentroids::menor</a></div><div class="ttdeci">bool menor(const NearestCentroids&lt; T_DIST, T_CLUSTERIDX &gt; &amp;ainearcent_b)</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00142">nearest_centroids.hpp:142</a></div></div>
<div class="ttc" id="classnearest_1_1_nearest_centroids_html_a7166aa1c05aa9640d11d51677d53890e"><div class="ttname"><a href="classnearest_1_1_nearest_centroids.html#a7166aa1c05aa9640d11d51677d53890e">nearest::NearestCentroids::getDistRecalculate</a></div><div class="ttdeci">bool getDistRecalculate()</div><div class="ttdef"><b>Definition:</b> <a href="nearest__centroids_8hpp_source.html#l00137">nearest_centroids.hpp:137</a></div></div>
<div class="ttc" id="namespacenearest_html"><div class="ttname"><a href="namespacenearest.html">nearest</a></div><div class="ttdoc">Function to find nearest instances.</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:31 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
